{% extends "base.html" %}

{% block head %}
A3B
{% endblock %}

{% block bodyHead %}
Carrito
{% endblock %}


{% block content %}

<div class="resultados">


{% if cart.has_items %}
<b>Se han comprado los siguientes libros exitosamente.</b>

  <form method="post" action="/shop/cart/updatecart/" enctype="x-www-form-urlencoded">
	<table width='100%'>
    	<tr>
	    <th align='right'>ISBN</th>
            <th align='right'>Precio</th>
            <th>Count</th>
        </tr>
    {% for item in cart.items %}
        <tr>
	    <td align='right'>{{ item.sku }}</td>
            <td align='right'>${{ item.price }}</td>
            <td align='center'>{{ item.count }}</td>
        </tr>
    {% endfor %}
    <tr>
        <th align='right'><i>Total</i></th>
        <th align='right'>${{ cart.get_total_price }}</th>
        <th align='center'>{{ cart.get_total_count }}</th>
        
        <td align='right'>
        <td align='left'><a href="../../../">Regresar a la pagina principal</a></td>
    </tr>
    </table>

  </form>

{% else %}
    <p>No tiene Libros en el carrito.</p>

        {% if cart.returnUrl %}
            <a style="color: #B2C5BA;" href="{{ cart.returnUrl }}"></a>
        {% endif %}

{% endif %}

</div>


{% endblock %}
